<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{ 
            width: 100%;
            height: 100%;
        } 
        .container {
            width: 100%;
            height: 150px;
            background-color: white;
            color: black;
        }
        .container.night {
            width: 100%;
            height: 150px;
            background-color: black;
            color: white;
        }
    </style>
</head>
<body class="container">
    <div class="worlds">
        这是一大段话；<br>
        这是一大段话；<br>
        这是一大段话；<br>
        这是一大段话；<br>
    </div>

    <script>
        var di = document.querySelector("body");
        di.onclick = function remove() {
            di.classList.toggle("night");
        }
    </script>
</body>
</html>